﻿@model Storytelling.Modelos.IEvolucaoFormModel
@if (ViewBag.Evoluir != null && ViewBag.Evoluir)
{
    <div id="dialogEvolucao" class="Dialog">
        @using (Html.BeginForm("Evoluir", "Personagem"))
        {
            <p>
                <input type="submit" value="Salvar" />
            </p>        
            <input type="hidden" name="Id" value="@(Model != null ? Model.Id : 0)" />
            <div id="inputEvolucao">
            </div>      
        }
        @if (Model.Opcoes != null)
        {
            <select id="selecaoEvolucao" onchange="@(Model.ConfigurarAutocompleteEvolucao)()">
                @foreach (var item in Model.Opcoes)
                {
                    <option value="@((int)item.Key)">@item.Value</option>
                }
            </select>             
        }
        <input id="autoEvolucao" type="text" />
        <table id="evolucao" width="100%">
            <thead>
                <tr>
                    <td id="experienciaAtual">@(Model != null ? Model.Experiencia : 0)</td>                
                    <td>-</td>
                    <td id="experienciaGasto">0</td>
                    <td>=</td>
                    <td id="experienciaTotal">@(Model != null ? Model.Experiencia : 0)</td>
                </tr>
                <tr>
                    <th>Campo</th>
                    <th>Tipo</th>
                    <th>Nível</th>
                    <th>Custo</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
} 